package chapter3.No3_2_方法join的使用.demo3;

/**
 * Created by Administrator on 2016/11/20.
 */
public class ThreadB extends Thread {
    @Override
    public void run() {
        ThreadA a = new ThreadA();
        a.start();
        try {
            System.out.println("线程B开始执行");
            a.join();
            System.out.println("线程B执行完成");
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
